In [4]:
%load_ext autoreload
%autoreload 2
import etherscan.tokens as tokens
import json
In [5]:
with open('../../api_key.json', mode='r') as key_file:
key = json.loads(key_file.read())['key']
Current tokenname
options are:
'TheDAO'
'DGD'
'MKR'
In [6]:
api = tokens.Tokens(tokenname='TheDAO', api_key=key)
In [8]:
address = '0x0a869d79a7052c7f1b55a8ebabbea3420f0d1e13'
api.get_token_balance(address=address)
Out[8]:
In [9]:
api.get_total_supply()
Out[9]:
In [ ]: